fun copy(a: Int = this.a, bar: Bar = this.bar, list: MutableList<Int> = this.list) = Foo(a, bar, list) fun copy(x: Int = this.x) = Bar(x)